package com.lottery.game.core.utils;

/**
 * @Author: zwei
 * @Date: 2018/8/29 20:49
 * @Description:
 */
public class HexUtil {

    private static final Integer key = 123456;

    /**
     * 加密
     * @param num
     * @return
     */
    public static  String toHex(Integer num){
        return Integer.toHexString(num+key);
    }

    /**
     * 解密
     * @param num
     * @return
     */
    public static  Integer parseInt(String num){
        return  Integer.parseInt(num,16)-key;
    }

}
